<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>UOS Libvirt Exporter - 极简风</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body class="theme-root3">
    <div class="container">
        <header>
            <h1>UOS Libvirt Exporter</h1>
            <p class="subtitle">极简风主题 | 现代化设计语言</p>
        </header>
        
        <div class="controls">
            <div class="template-selector">
                <span>主题模板:</span>
                <button class="template-btn {{if eq .TemplateName "root.html"}}active{{end}}" onclick="switchTemplate('root.html')">默认</button>
                <button class="template-btn {{if eq .TemplateName "root1.html"}}active{{end}}" onclick="switchTemplate('root1.html')">简洁蓝</button>
                <button class="template-btn {{if eq .TemplateName "root2.html"}}active{{end}}" onclick="switchTemplate('root2.html')">暗色终端</button>
                <button class="template-btn {{if eq .TemplateName "root3.html"}}active{{end}}" onclick="switchTemplate('root3.html')">极简风</button>
                <button class="template-btn {{if eq .TemplateName "root4.html"}}active{{end}}" onclick="switchTemplate('root4.html')">Dracula</button>
            </div>
            <button class="refresh-btn" onclick="refreshPage()">刷新页面</button>
        </div>
        
        <div class="main-content">
            <div class="content-wrapper">
                <div class="links">
                    <h2 class="section-title">功能导航</h2>
                    <div class="link-list">
                        <a class="link-item" href="{{.MetricsPath}}">
                            <span class="link-icon">📈</span>
                            <span class="link-text">
                                <span class="link-title">监控指标</span>
                                <span class="link-description">查看详细的虚拟化环境性能数据</span>
                            </span>
                        </a>
                        <a class="link-item" href="/health">
                            <span class="link-icon">❤️</span>
                            <span class="link-text">
                                <span class="link-title">健康检查</span>
                                <span class="link-description">检查服务运行状态和可用性</span>
                            </span>
                        </a>
                        <a class="link-item" href="/ready">
                            <span class="link-icon">✅</span>
                            <span class="link-text">
                                <span class="link-title">就绪检查</span>
                                <span class="link-description">确认服务是否准备就绪</span>
                            </span>
                        </a>
                    </div>
                </div>
                
                <div class="info-section">
                    <h2 class="section-title">系统信息</h2>
                    <div class="info-list">
                        <div class="info-item">
                            <span class="info-label">版本信息:</span>
                            <span class="info-value">{{.Version}}</span>
                        </div>
                        <div class="info-item">
                            <span class="info-label">构建时间:</span>
                            <span class="info-value">{{.BuildTime}}</span>
                        </div>
                        <div class="info-item">
                            <span class="info-label">运行时长:</span>
                            <span class="info-value">{{.Uptime}}</span>
                        </div>
                        <div class="info-item">
                            <span class="info-label">Libvirt URI:</span>
                            <span class="info-value">{{.LibvirtURI}}</span>
                        </div>
                        <div class="info-item">
                            <span class="info-label">虚拟机总数:</span>
                            <span class="info-value">{{.TotalVMs}}</span>
                        </div>
                        <div class="info-item">
                            <span class="info-label">活跃虚拟机:</span>
                            <span class="info-value">{{.ActiveVMs}}</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <footer>
            <p>UOS Libvirt Exporter © 2025 | 极简风主题</p>
        </footer>
    </div>

    <script>
        function refreshPage() {
            location.reload();
        }
        
        function switchTemplate(templateName) {
            const url = new URL(window.location);
            url.searchParams.set('template', templateName);
            window.location.href = url.toString();
        }
    </script>
</body>
</html>